package com.pointmi.transactionservice;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

import com.pointmi.transactiondao.Transaction;
import com.pointmi.transactiondao.TransactionDAO;

public class TransactionServiceImpl implements TransactionService {
	
	@Autowired
	@Qualifier("transactionDAO")
	TransactionDAO transactionDao;
	
	public void setTransactionDao(TransactionDAO transactionDao)
	{
		this.transactionDao = transactionDao;
	}

	public List<Transaction> findAllTransaction()
	{
		return transactionDao.findAllTransaction();		
	}

	public void saveOrUpdate(Transaction transaction) {
		
		transactionDao.saveOrUpdate(transaction);
	}

	public Transaction findTransactionByCustomerId(String customerId)
	{
		return transactionDao.findTransactionByCustomerId(customerId);
	}
}
